#include"rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"
#include "std_msgs/msg/bool.hpp"
#include"std_msgs/msg/int32.hpp"
using namespace std::chrono_literals;
using std::placeholders::_1;
class node3:public rclcpp::Node{
    public:
    node3():Node("node3"){
        puber3_=this->create_publisher<std_msgs::msg::String>("oss",10);
        suber3_=this->create_subscription<std_msgs::msg::Int32>("fb",10,std::bind(&node3::sub3_callback,this,_1));
    }
    private:
    rclcpp::Publisher<std_msgs::msg::String>::SharedPtr puber3_;
    rclcpp::Subscription<std_msgs::msg::Int32>::SharedPtr suber3_;
    void sub3_callback(const std_msgs::msg::Int32 &msg)const{
        auto message=std_msgs::msg::String();
        message.data=msg.data;
        puber3_->publish(message);
    }
};
int main(int argc,char* argv[]){
    rclcpp::init(argc,argv);
    rclcpp::spin(std::make_shared<node3>());
    rclcpp::shutdown();
    return 0;

}